export const tableOption = {
  border: true,
  index: true,
  indexLabel: "序号",
  stripe: true,
  menuAlign: "center",
  align: "center",
  dialogDirection: "rtl",
  searchMenuSpan: 6,
  column: [
    {
      type: "select",
      label: "上传类型",
      prop: "type",
      value: 1,
      dicData: [
        {
          label: "图片",
          value: 1,
        },
        {
          label: "视频",
          value: 2,
        },
      ],
      rules: [
        {
          required: true,
          message: "请选择所属分类",
          trigger: "blur",
        },
      ],
      hide: true,
      change: ({ value }) => {
        tableOption.column[1].display = value == 1;
        tableOption.column[2].display = value == 2;
      },
    },
    {
      type: "upload",
      label: "图片",
      prop: "image",
      span: 24,
      action: "/fastfile/upload/szgk-1256675456",
      listType: "picture-img",
      accept: "image/png, image/jpeg",
      dataType: "string",
      limit: 1,
      propsHttp: {
        res: "data",
        url: "kpath",
      },
      display: true,
    },
    {
      type: "input",
      label: "内容视频",
      prop: "video",
      type: "upload",
      action: "/fastfile/upload/szgk-1256675456",
      listType: "picture-img",
      fileSize: 5000000,
      tip: "不超过500M",
      dataType: "string",
      accept: ".mp4",
      limit: 1,
      propsHttp: {
        res: "data",
        url: "kpath",
      },
      span: 24,
      display: false,
    },
    {
      type: "input",
      label: "排序",
      prop: "sort",
      span: 24,
      rules: [
        {
          required: true,
          message: "请输入排序",
          trigger: "blur",
        },
      ],
    },
  ],
};
